<script setup lang="ts">

import {
  Menu as IconMenu,
  Location,
} from '@element-plus/icons-vue'
const handleOpen = (key: string, keyPath: string[]) => {
  console.log(key, keyPath)
}
const handleClose = (key: string, keyPath: string[]) => {
  console.log(key, keyPath)
}
import {useRouter} from 'vue-router'
const router = useRouter();

</script>

 
<template>
  <div class="common-layout">
    <el-container>
      <el-aside width="200px" style="border: wheat solid 1px;">
                <!-- 侧边菜单栏 -->
                <el-row class="tac">
    <el-col :span="24">
      <h5 class="mb-2">猫咪管理系统</h5>
      <el-menu
        default-active="2"
        class="el-menu-vertical-demo"
        @open="handleOpen"
        @close="handleClose" router
      >
        <el-menu-item index="/index">
          <el-icon><icon-menu /></el-icon>
          <span>首页</span>
        </el-menu-item>
        <!-- 子菜单类 -->
        <el-sub-menu index="/catinfo">
          <template #title>
            <el-icon><location /></el-icon>
            <span>猫咪管理</span>
          </template>
            <el-menu-item index="/catinfo">猫咪信息</el-menu-item>
            <el-menu-item index="2-2">item two</el-menu-item>    
        </el-sub-menu>
        <!-- 子菜单标签-->
        <el-sub-menu index="/category">
          <template #title>
            <el-icon><location /></el-icon>
            <span>基础信息</span>
          </template>
            <el-menu-item index="/category">猫咪品种</el-menu-item>     
        </el-sub-menu> 
      </el-menu>
    </el-col>
  </el-row>
      </el-aside>
      <el-main style="border: wheat solid 1px;"><router-view></router-view></el-main>
    </el-container>
  </div>
</template>




<style scoped>

</style>
